/**
 * ipassbook 0.6.0
 * Copyright (C)2009 wateray and contributors
 * wateray@gmail.com
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

package com.wateray.ipassbook.domain;

import java.io.Serializable;
import java.util.Date;

/**
 * @author wateray
 * @create 2009-5-23
 */
public class PassbookDetail implements Entity, Serializable{

	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = 1L;
	
	private String passbookId;
	private String passbookSubId;
	private String currencyId;
	private double  capital;
	private double  balance;
	private double  minBalance;
	private int period;
	private double interestRate;
	private double interest;
	private int interestPayFlag;
	private double tax;
	private int noticeFlag;
	private double overdraft;
	private String billDate;  //mmdd
	private String payDate;  //mmdd
	private int payPeriod;
	private double tradeFee;
	private int tradeTimes;
	private double fixAmount;
	private String status;
	private String closeDate;
	private String memo;
	private String regeditUserId;
	private Date regeditDate;
	private String updateUserId;
	private Date updateDate;
	
	
	
	public PassbookDetail(){}
	
	/**
	 * @return the passbookId
	 */
	public String getPassbookId() {
		return passbookId;
	}

	/**
	 * @param passbookId the passbookId to set
	 */
	public void setPassbookId(String passbookId) {
		this.passbookId = passbookId;
	}

	/**
	 * @return the passbookSubId
	 */
	public String getPassbookSubId() {
		return passbookSubId;
	}

	/**
	 * @param passbookSubId the passbookSubId to set
	 */
	public void setPassbookSubId(String passbookSubId) {
		this.passbookSubId = passbookSubId;
	}

	/**
	 * @return the currencyId
	 */
	public String getCurrencyId() {
		return currencyId;
	}

	/**
	 * @param currencyId the currencyId to set
	 */
	public void setCurrencyId(String currencyId) {
		this.currencyId = currencyId;
	}

	/**
	 * @return the capital
	 */
	public double getCapital() {
		return capital;
	}

	/**
	 * @param capital the capital to set
	 */
	public void setCapital(double capital) {
		this.capital = capital;
	}

	/**
	 * @return the balance
	 */
	public double getBalance() {
		return balance;
	}

	/**
	 * @param balance the balance to set
	 */
	public void setBalance(double balance) {
		this.balance = balance;
	}

	/**
	 * @return the minBalance
	 */
	public double getMinBalance() {
		return minBalance;
	}

	/**
	 * @param minBalance the minBalance to set
	 */
	public void setMinBalance(double minBalance) {
		this.minBalance = minBalance;
	}

	/**
	 * @return the period
	 */
	public int getPeriod() {
		return period;
	}

	/**
	 * @param period the period to set
	 */
	public void setPeriod(int period) {
		this.period = period;
	}

	/**
	 * @return the interestRate
	 */
	public double getInterestRate() {
		return interestRate;
	}

	/**
	 * @param interestRate the interestRate to set
	 */
	public void setInterestRate(double interestRate) {
		this.interestRate = interestRate;
	}

	/**
	 * @return the interest
	 */
	public double getInterest() {
		return interest;
	}

	/**
	 * @param interest the interest to set
	 */
	public void setInterest(double interest) {
		this.interest = interest;
	}

	/**
	 * @return the interestPayFlag
	 */
	public int getInterestPayFlag() {
		return interestPayFlag;
	}

	/**
	 * @param interestPayFlag the interestPayFlag to set
	 */
	public void setInterestPayFlag(int interestPayFlag) {
		this.interestPayFlag = interestPayFlag;
	}

	/**
	 * @return the tax
	 */
	public double getTax() {
		return tax;
	}

	/**
	 * @param tax the tax to set
	 */
	public void setTax(double tax) {
		this.tax = tax;
	}

	/**
	 * @return the noticeFlag
	 */
	public int getNoticeFlag() {
		return noticeFlag;
	}

	/**
	 * @param noticeFlag the noticeFlag to set
	 */
	public void setNoticeFlag(int noticeFlag) {
		this.noticeFlag = noticeFlag;
	}

	/**
	 * @return the overdraft
	 */
	public double getOverdraft() {
		return overdraft;
	}

	/**
	 * @param overdraft the overdraft to set
	 */
	public void setOverdraft(double overdraft) {
		this.overdraft = overdraft;
	}

	/**
	 * @return the billDate
	 */
	public String getBillDate() {
		return billDate;
	}

	/**
	 * @param billDate the billDate to set
	 */
	public void setBillDate(String billDate) {
		this.billDate = billDate;
	}

	/**
	 * @return the payDate
	 */
	public String getPayDate() {
		return payDate;
	}

	/**
	 * @param payDate the payDate to set
	 */
	public void setPayDate(String payDate) {
		this.payDate = payDate;
	}

	/**
	 * @return the payPeriod
	 */
	public int getPayPeriod() {
		return payPeriod;
	}

	/**
	 * @param payPeriod the payPeriod to set
	 */
	public void setPayPeriod(int payPeriod) {
		this.payPeriod = payPeriod;
	}

	/**
	 * @return the tradeFee
	 */
	public double getTradeFee() {
		return tradeFee;
	}

	/**
	 * @param tradeFee the tradeFee to set
	 */
	public void setTradeFee(double tradeFee) {
		this.tradeFee = tradeFee;
	}

	/**
	 * @return the tradeTimes
	 */
	public int getTradeTimes() {
		return tradeTimes;
	}

	/**
	 * @param tradeTimes the tradeTimes to set
	 */
	public void setTradeTimes(int tradeTimes) {
		this.tradeTimes = tradeTimes;
	}

	/**
	 * @return the fixAmount
	 */
	public double getFixAmount() {
		return fixAmount;
	}

	/**
	 * @param fixAmount the fixAmount to set
	 */
	public void setFixAmount(double fixAmount) {
		this.fixAmount = fixAmount;
	}

	/**
	 * @return the status
	 */
	public String getStatus() {
		return status;
	}

	/**
	 * @param status the status to set
	 */
	public void setStatus(String status) {
		this.status = status;
	}

	/**
	 * @return the closeDate
	 */
	public String getCloseDate() {
		return closeDate;
	}

	/**
	 * @param closeDate the closeDate to set
	 */
	public void setCloseDate(String closeDate) {
		this.closeDate = closeDate;
	}

	/**
	 * @return the memo
	 */
	public String getMemo() {
		return memo;
	}

	/**
	 * @param memo the memo to set
	 */
	public void setMemo(String memo) {
		this.memo = memo;
	}

	/**
	 * @return the regeditUserId
	 */
	public String getRegeditUserId() {
		return regeditUserId;
	}

	/**
	 * @param regeditUserId the regeditUserId to set
	 */
	public void setRegeditUserId(String regeditUserId) {
		this.regeditUserId = regeditUserId;
	}

	/**
	 * @return the regeditDate
	 */
	public Date getRegeditDate() {
		return regeditDate;
	}

	/**
	 * @param regeditDate the regeditDate to set
	 */
	public void setRegeditDate(Date regeditDate) {
		this.regeditDate = regeditDate;
	}

	/**
	 * @return the updateUserId
	 */
	public String getUpdateUserId() {
		return updateUserId;
	}

	/**
	 * @param updateUserId the updateUserId to set
	 */
	public void setUpdateUserId(String updateUserId) {
		this.updateUserId = updateUserId;
	}

	/**
	 * @return the updateDate
	 */
	public Date getUpdateDate() {
		return updateDate;
	}

	/**
	 * @param updateDate the updateDate to set
	 */
	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}
	
	/**
	 * @return the passbookDetailId
	 */
	public String getPassbookDetailId() {
		return passbookId + passbookSubId;
	}

	@Override
	public String getEntityId() {
		// TODO Auto-generated method stub
		return getPassbookDetailId();
	}

	@Override
	public String getEntityName() {
		// TODO Auto-generated method stub
		return null;
	}
	
	public boolean equals(Object obj){
		if(obj == null){
			return false;
		}
		if(!(obj instanceof PassbookDetail)){
			return false;
		}
		if(!((PassbookDetail)obj).getEntityId().equals(this.getEntityId())){
			return false;
		}
		
		return true;
	}

}
